//
//  AudioRecordHelper.h
//  BaiTengIM
//
//  Created by awh on 2019/7/1.
//  Copyright © 2019年 awh. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol AudioRecordHelperDelegate <NSObject>

@optional;

- (void)audioRecordHelperRecordTimeout;
- (void)audioCountdownWithTime:(NSInteger)time;
@end

@interface AudioRecordHelper : NSObject

SingleH(AudioRecordHelper);

@property(nonatomic, weak) id<AudioRecordHelperDelegate> delegate;

- (void)startRecordWithPath:(NSString *)path
                 completion:(void(^)(NSError *error))completion;

-(void)stopRecordWithCompletion:(void(^)(NSString *path, NSInteger timeLength))completion;

-(void)cancelRecord;

@end

NS_ASSUME_NONNULL_END
